import React, { Component } from 'react'
import {NavLink} from 'react-router-dom'
import RouterView from '../router/RouterView'
import '../css/home.css'
export default class Home extends Component {
    render() {
        let {child,navLink}=this.props
        return (
            <div className="box">
                <main>
                    {
                        <RouterView routerList={child}></RouterView>
                    }
                </main>
                <footer>
                    {
                        navLink.map((item,index)=>{
                        return <NavLink key={index} to={item.path}>{item.title}</NavLink>
                        })
                    }
                </footer>
            </div>
        )
    }
}
